package com.ruoyi.dmsIms.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.dmsIms.domain.vo.PlanInterList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.dmsIms.mapper.TestPlanInterMapper;
import com.ruoyi.dmsIms.domain.TestPlanInter;
import com.ruoyi.dmsIms.service.ITestPlanInterService;

/**
 * 测试计划接口Service业务层处理
 * 
 * @author ZhangSiRui
 * @date 2021-12-16
 */
@Service
public class TestPlanInterServiceImpl implements ITestPlanInterService 
{
    @Autowired
    private TestPlanInterMapper testPlanInterMapper;

    /**
     * 查询测试计划接口
     * 
     * @param id 测试计划接口主键
     * @return 测试计划接口
     */
    @Override
    public TestPlanInter selectTestPlanInterById(Long id)
    {
        return testPlanInterMapper.selectTestPlanInterById(id);
    }

    /**
     * 查询测试计划接口列表
     * 
     * @param testPlanInter 测试计划接口
     * @return 测试计划接口
     */
    @Override
    public List<TestPlanInter> selectTestPlanInterList(TestPlanInter testPlanInter)
    {
        return testPlanInterMapper.selectTestPlanInterList(testPlanInter);
    }

    @Override
    public List<PlanInterList> selectPlanInterList(Long id) {
        return testPlanInterMapper.selectPlanInterList(id);
    }

    /**
     * 新增测试计划接口
     * 
     * @param testPlanInter 测试计划接口
     * @return 结果
     */
    @Override
    public int insertTestPlanInter(TestPlanInter testPlanInter)
    {
        testPlanInter.setCreateTime(DateUtils.getNowDate());
        return testPlanInterMapper.insertTestPlanInter(testPlanInter);
    }

    /**
     * 修改测试计划接口
     * 
     * @param testPlanInter 测试计划接口
     * @return 结果
     */
    @Override
    public int updateTestPlanInter(TestPlanInter testPlanInter)
    {
        testPlanInter.setUpdateTime(DateUtils.getNowDate());
        return testPlanInterMapper.updateTestPlanInter(testPlanInter);
    }

    /**
     * 批量删除测试计划接口
     * 
     * @param ids 需要删除的测试计划接口主键
     * @return 结果
     */
    @Override
    public int deleteTestPlanInterByIds(Long[] ids)
    {
        return testPlanInterMapper.deleteTestPlanInterByIds(ids);
    }

    /**
     * 删除测试计划接口信息
     * 
     * @param id 测试计划接口主键
     * @return 结果
     */
    @Override
    public int deleteTestPlanInterById(Long id)
    {
        return testPlanInterMapper.deleteTestPlanInterById(id);
    }

    @Override
    public int deleteTestPlanInterByInterIds(Long planId, List<Long> ids) {
        return testPlanInterMapper.deleteTestPlanInterByInterIds(planId, ids);
    }
}
